const request = require('request');


const query = (data) => {
	request({
		url: 'http://127.0.0.1:7001/monitor/web/report',
		method: "POST",
		json: true,
		headers: {
			"Content-Type": "application/json",
			"user_id": "946870564@qq.com",
			"app_id": 946870564,
			"url_path": "https://webxr.doctorwork.com/rapp/service-panel/questionnaire/"
		},
		body: data
	}, function (error, response, body) {
		if (!error && response.statusCode == 200) {
		}
	});
}
function randomString(len) {
	len = len || 32;
	var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';    /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
	var maxPos = $chars.length;
	var pwd = '';
	for (i = 0; i < len; i++) {
		pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
	}
	return pwd;
}
setInterval(() => {
	const data = {
		errorList: [{
		time: new Date().getTime(),
		content: randomString(128)
	},{
		time: new Date().getTime(),
		content: randomString(128)
	},{
		time: new Date().getTime(),
		content: randomString(128)
	}]
	}
	query(data);
}, 100)
